package com.shenhangye.pushlive.camera.view

import android.content.Context
import android.opengl.GLSurfaceView
import android.util.AttributeSet
import com.shenhangye.pushlive.render.CameraRender
import com.shenhangye.pushlive.render.CameraRender1

class CameraGlSurfaceview(context: Context, attributeSet: AttributeSet) :
    GLSurfaceView(context, attributeSet) {

        var mCameraRender1:CameraRender1?=null
    init {
        setEGLContextClientVersion(2)
        mCameraRender1=CameraRender1(context,this)
        setRenderer(mCameraRender1)
        renderMode= RENDERMODE_WHEN_DIRTY
    }
    fun onStop(){
        mCameraRender1?.onstop()
    }
    fun startRecorde(){
        mCameraRender1?.startRecord()
    }



}